﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _031
{
    public interface IParentInterface//定义父类接口
    {
        void ParentInterfaceMethod();
    }
    public interface IMyInterface:IParentInterface//继承父类接口
    {
        void MethodToImplement();
    }
    internal class Program:IMyInterface//实现接口
    {
        static void Main(string[] args)
        {
            Program demo = new Program();
            demo.MethodToImplement();
            demo.ParentInterfaceMethod();
        }
        public void MethodToImplement()
        {
            Console.WriteLine("实现IMyInterface接口中的MethodToImplement函数");

        }
        public void ParentInterfaceMethod()
        {
            Console.WriteLine("实现IParentInterface接口中的ParentInterfaceMethod函数");
        }
    }
}
